<?php 
require 'config.php';
ob_clean();

$iCat = getValue('iCat');
$page = getValue('iPage');

$page = ($page >= 2) ? $page : 1;
$rows_per_page = 24;
$page_start = ($page - 1) * $rows_per_page;
$page_end = $page * $rows_per_page;
//Khối tin cat
$db_list_news = new db_query('SELECT new_id,new_title,new_date,new_picture,new_teaser,new_detail,new_tags,new_relate,new_active,
                                new_cat_id,cat_id,cat_name
                                FROM news 
                                LEFT JOIN categories_multi ON cat_id = new_cat_id 
                                WHERE new_cat_id = '.$iCat.' AND new_active = 1
                                ORDER BY new_id DESC 
                                LIMIT '.$page_start . ', '. $rows_per_page);
$list_news = $db_list_news->resultArray();
unset($db_list_news);
$iActive = getValue('iActive','int','GET',0);
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="vi" lang="vi" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<title>Tin Tức <?=$list_news[0]['cat_name']?></title>
<meta name="language" content="vietnamese" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="initial-scale=1, maximum-scale=1.0, minimum-scale=1.0" name="viewport" />
<meta name="AUTHOR" content="Vnupdate" />
<meta name="description" content="Tin cập nhật, tin tức mới nhất, tin tức online về chủ đề <?=$list_news[0]['cat_name']?>"/>
<meta name="COPYRIGHT" content="Copyright (C) 2012 VnUpdate.net" />
<meta name="ROBOTS" content="INDEX, FOLLOW" />
<meta name="RATING" content="GENERAL" />
<meta property="og:title" content="Tin Tức <?=$list_news[0]['cat_name']?>" />
<meta property="og:type" content="article" />
<meta property="og:url" content="<?=DOMAIN.$_SERVER['REQUEST_URI']?>" />
<meta property="og:image" content="<?=DOMAIN?>/themes/img/logo.png" />
<meta property="og:site_name" content="VnUpdate" />
<meta property="og:description" content="Tin cập nhật, tin tức mới nhất, tin tức online về chủ đề <?=$list_news[0]['cat_name']?>" />
<meta property="fb:admins" content="100004609203263" />
<meta property="fb:app_id" content="447585838689244"/>
<link href="<?=DOMAIN?>/favicon.png" type="image/x-icon" rel="shortcut icon"/>
<link rel="canonical" href="<?=DOMAIN.$_SERVER['REQUEST_URI']?>" />
<link rel="apple-touch-startup-image" media="screen and (max-device-width: 320px)" />  
<link rel="apple-touch-startup-image" media="(max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)" /> 
<link rel="apple-touch-startup-image" sizes="640x1096"/>
<link rel="apple-touch-startup-image" sizes="1024x748" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: landscape)" />
<link rel="apple-touch-startup-image" sizes="768x1004" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: portrait)" />
<link rel="apple-touch-startup-image" sizes="1536x2008" media="(device-width: 768px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)"/>
<link rel="apple-touch-startup-image" sizes="1496x2048" media="(device-width: 768px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)"/>
<?=$css_global?>
<?=$js_global?>
</head>
<body>
    <h1 style="display: none;">Tin tức <?=GetNamecat($iCat)?></h1>
    <div class="all-elements">
        <? include_once('../includes/inc_header.php');?>
        <? include_once('../includes/inc_news_cat.php'); ?>
    </div>
</body>
</html>
